package concurrency.chapter2;

/**
 * FileName: Test
 * Author:   周壮
 * Date:     2020/5/24 16:04
 * Description:
 */
public class Test {
    // 修饰非静态方法
    synchronized void demo() {
        // 临界区
    }
    // 修饰代码块
    Object obj = new Object();
    void demo01() {
        synchronized (obj) {
            // 临界区
        }
    }
}
